package com.platform.modules.wallet.service;

import com.platform.common.web.service.BaseService;
import com.platform.modules.chat.vo.ChatVo01;
import com.platform.modules.chat.vo.ChatVo02;
import com.platform.modules.wallet.domain.WalletRedPacket;
import com.platform.modules.wallet.domain.WalletRedPacketSub;
import com.platform.modules.wallet.vo.RedPacketVo01;

import java.util.List;

public interface WalletRedPacketService extends BaseService<WalletRedPacket> {

    /**
     * 个人红包交易
     *
     * @param chatVo
     * @return
     */
    WalletRedPacket transfer(ChatVo01 chatVo, Long userId);

    /**
     * 群红包交易
     *
     * @param chatVo
     * @return
     */
    WalletRedPacket transfer(ChatVo02 chatVo, Long userId);

    /**
     * 创建红包
     *
     * @param vo
     * @return
     */
    WalletRedPacket createRedPacket(RedPacketVo01 vo);

    /**
     * 开红包
     *
     * @param id
     * @return
     */
    boolean openRedPacket(String id, Long userId);


    boolean findToIdByUserId(Long id, Long userId);

    /**
     * 查询被接收的红包记录
     *
     * @param id
     * @return
     */
    List<WalletRedPacketSub> querySubSuccessList(Long id);
    /**
     * 查询未被接收的红包记录
     *
     * @param id
     * @return
     */
    List<WalletRedPacketSub> querySubInitList(Long id);

    /**
     * 根基queryId查询红包订单
     * @param queryId
     * @return
     */
    WalletRedPacket getByQueryId(String queryId);
}
